import request from "@/utils/request";
import cfg from "@/config/config";

const repair = {
    //根据单号获取详单人员信息
  getUsersOfOrder: param => {
    return request(
      "post",
      cfg.apiUrl + "bdRepairAttendance/getUsersOfOrder",
      param
    );
  },
    //保存补出勤单
    saveRepair: param => {
    return request(
      "post",
      cfg.apiUrl + "bdRepairAttendance/saveRepair",
      param
    );
  },
    //删除补出勤单
  deleteRepair: param => {
    return request(
      "post",
      cfg.apiUrl + "bdRepairAttendance/deleteRepair",
      param
    );
  },
  doApproval: param => {
    return request(
        "post",
        cfg.apiUrl + "bdRepairAttendance/doApproval",
        param
    );
  },
  /**
   * 根据单据ID获取请假单详情
   * @param param
   */
  getLeaveOrderById(param) {
    return request(
        "get",
        cfg.apiUrl + "bdRepairAttendance/detail",
        param
    );
  }
};

export default repair;
